<template>
  <div>
    <all_header :thisTitle="msg"></all_header>
    <div class="page_contents">
      <div class="llegal_from">
        <input type="text" placeholder="车牌号" name="cph">
        <input type="text" placeholder="车架号" name="cjh">
        <input type="text" placeholder="发动机号" name="fdjh">
        <input type="tel" placeholder="手机号" name="sjh">
        <a @click.stop="llegalbtn">查询</a>
      </div>
    </div>
    <Footer_btn></Footer_btn>

  </div>
</template>
<style>

</style>
<script>
  import all_header from '../assembly/BackGoHome.vue'
  import Footer_btn from '../assembly/footer_btn.vue'
  export default{
    data(){
      return {
        msg: '违章查询'
      }
    },
    components: {
      all_header,
      Footer_btn
    },
    methods: {
      llegalbtn: function () {
        let cph = $('input[name="cph"]').val()
        let cjh = $('input[name="cjh"]').val()
        let fdjh = $('input[name="fdjh"]').val()
        let sjh = $('input[name="sjh"]').val()
        $.ajax({
          url: 'http://www.cheshouye.com/api/weizhang/query_task?',
          type: 'POST',
          data: {
            hphm: cph,
            classno: cjh,
            engineno: fdjh,
            city_id: '01',
            car_type:'02',
            app_id:'2510',
            app_key: '366c7da11ea8d169b2e8c23117996485'
          },
          dataType: 'jsonp',
          success: function (data) {
            console.log(data)
          }
        })
      }
    }
  }
</script>
